<% if(pager.pageCount > 0) { %>
<nav aria-label="Page navigation">
    <ul class="pagination justify-content-center">
      <% var group = Math.ceil(pager.pageCount / 10); var curGro = Math.ceil(pager.pageIndex / 10) %>
      <% var start = (curGro - 1) * 10 + 1;var end = (curGro - 1) * 10 + 10;end = end > pager.pageCount ? pager.pageCount : end %>
      <% if(pager.pageIndex > 1 && start <= end) { %>
      <li class="page-item">
        <a class="page-link" href="<%=path %>pageIndex=<%=pager.pageIndex - 1 %>&pageSize=<%=pager.pageSize %>" aria-label="Previous">
          <span aria-hidden="true">&laquo;</span>
          <span class="sr-only">上一页</span>
        </a>
      </li>
      <% } %>
      <% for(start; start <= end; start++) { %>
      <li class="page-item<%= pager.pageIndex === start ? ' active' : '' %>">
        <a class="page-link" href="<%=path %>pageIndex=<%=start %>&pageSize=<%=pager.pageSize %>"><%=start %></a>
      </li>
      <% } %>
      <% if(pager.pageIndex < pager.pageCount) { %>
      <li class="page-item">
        <a class="page-link" href="<%=path %>pageIndex=<%=pager.pageIndex + 1 %>&pageSize=<%=pager.pageSize %>" aria-label="Next">
          <span aria-hidden="true">&raquo;</span>
          <span class="sr-only">下一页</span>
        </a>
      </li>
      <% } %>
    </ul>
</nav>
<% } %>